package com.model;

import java.io.Serializable;
import java.util.List;

/**
 * Created by wangyg on 2016/11/10.
 */
public class Model2 implements Serializable{
	private List<Model1> model;
	private String msg;
	private Integer id;

	public List<Model1> getModel() {
		return model;
	}

	public void setModel(List<Model1> model) {
		this.model = model;
	}

	public String getMsg() {
		return msg;
	}

	public void setMsg(String msg) {
		this.msg = msg;
	}

	public Integer getId() {
		return id;
	}

	public void setId(Integer id) {
		this.id = id;
	}

	@Override
	public String toString() {
		return "Model2{" +
				"model=" + model +
				", msg='" + msg + '\'' +
				", id=" + id +
				'}';
	}

	@Override
	public boolean equals(Object o) {
		if (this == o)
			return true;
		if (o == null || getClass() != o.getClass())
			return false;

		Model2 model2 = (Model2) o;

		if (model != null ? !model.equals(model2.model) : model2.model != null)
			return false;
		if (msg != null ? !msg.equals(model2.msg) : model2.msg != null)
			return false;
		return id != null ? id.equals(model2.id) : model2.id == null;

	}

	@Override
	public int hashCode() {
		int result = model != null ? model.hashCode() : 0;
		result = 31 * result + (msg != null ? msg.hashCode() : 0);
		result = 31 * result + (id != null ? id.hashCode() : 0);
		return result;
	}
}
